home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn-1.4-l / inn-1 / inn-1.4-linux-0.1 / bash-patches / bash-1.12-linux.readme < prev   
Text File  |  1993-05-01  |  2KB  |  61 lines

  1. Newsgroups: comp.os.linux.announce
  2. From: jrs@world.std.com (Rick Sladkey)
  3. Date: Sun, 2 May 1993 01:56:11 GMT
  4. Subject: bug fix for bash-1.12 available
  5. Keywords: bash, non-interactive, bug-fix
  6. Summary: bug fixed where two programs can fight for input when SHELL is bash
  7. Message-ID: <JRS.93May1215611@lepton.world.std.com>
  8. Organization: The Internet
  9. Lines: 50
  10.  
  11. I have uploaded a fixed version of bash-1.12 for Linux to
  12. sunsite.unc.edu.  The file for now is:
  13.  
  14. * sunsite.unc.edu:/pub/Linux/Incoming/bash-1.12-fixed.tar.z
  15.  
  16. This gzipped file contains Linux patches against bash-1.12 and a
  17. static binary for Linux.
  18.  
  19. This distribution fixes the oft cited bug where shelling out to an
  20. editor (emacs, elvis, vile) from any program followed by an interrupt
  21. character causes both programs to fight for input.  We get several
  22. messages per week on comp.os.linux asking if this is a kernel bug.  It
  23. is not a kernel bug.
  24.  
  25. In fact, it is due to a buglet in bash that causes bash to die when it
  26. is run non-interactively as the parent of a program that catches
  27. SIGINT without exiting.  For example, if you shell out to emacs from,
  28. say, elm or trn, and type `^G' all hell breaks loose and you have to
  29. kill both programs.
  30.  
  31. Since bash is my favorite shell, and since this is very disabling bug
  32. for those who frequently run into it, and since we get so many bug
  33. reports on c.o.l, I decided to take a stab at fixing it. I do not
  34. promise my fix is elegant, complete, or even correct.  But it does
  35. work around this most common problem, seemingly without breaking
  36. anything else.
  37.  
  38. This fix also works for other platforms than Linux where bash also
  39. shows this bug.  Until bash-1.13 comes along (which corrects this
  40. problem) this may have to do.  The fix is quite simple and is appended
  41. here.
  42.  
  43. Rick Sladkey <jrs@world.std.com>
  44. -----
  45. *** orig/bash-1.12/jobs.c    Fri Jan 17 16:36:11 1992
  46. --- bash-1.12/jobs.c        Sat May  1 15:00:03 1993
  47. ***************
  48. *** 1251,1256 ****
  49. --- 1253,1263 ----
  50.         sigset_t set;
  51.   
  52.         sigemptyset (&set);
  53. +       if (!interactive)
  54. +     {
  55. +       sigaddset(&set, SIGINT);    
  56. +       sigaddset(&set, SIGQUIT);    
  57. +     }
  58.         sigsuspend (&set);
  59.   #else /* SCO Unix */
  60.         struct sigaction act, oact;
  61.